package com.sy.mapper.inventory;

import com.sy.bean.inventory.Allocate;
import com.sy.bean.inventory.AllocateDetail;
import com.sy.common.crud.IMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface AllocateMapper extends IMapper<Allocate> {


    /**
     * 根据id查询调拨单明细
     * @param id
     * @return
     */
    List<Allocate> queryById(int id);


    /**
     * 审核调拨单
     * @param id
     * @return
     */
    int examineById(@Param("reviewers") String reviewers,@Param("id") int id,@Param("type") int type);

    /**
     * 新增调拨单
     * @param allocate
     * @return
     */
    int insertAllocate(Allocate allocate);

    /**
     * 新增调拨单明细
     * @param allocateDetailList
     * @return
     */
    int insertAllocateDetail(@Param("aId") int aId ,@Param("allocateDetailList") List<AllocateDetail> allocateDetailList);



}
